home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-07-23 | 3.6 KB | 89 lines | [TEXT/MPS ] |
- # File: iacDriver.make
- # Target: iacDriver
- # Sources: iacDriver.cp
- # Created: Friday, July 7, 1990 3:24:05 PM
-
-
- # Include all your objects in the objects variable. In this case, these are all the
- # c++ object files we'll be dealing with.
- CPOBJECTS = DriverGlue.a.o ∂
- TDriver.cp.o ∂
- TMessage.cp.o ∂
- DriverWrapper.cp.o ∂
- iacGlobalNewDel.cp.o
-
-
- # include all the c object files we want to deal with. In this case, it's only one
- # file, and that houses the code for our INIT.
- COBJECTS = installDriver.c.o
-
-
- # Specify any options you want to pass to the compiler(s). -b tells the compiler to
- # put strings in with the current segment, and not in the global data segment.
- CPlusOptions = -b -mf
- COptions = -b
-
-
-
- # Compile the INIT. Make the dependencies the INIT header, the INIT source, and the
- # makefile.
- installDriver.c.o ƒ iacDriver.make installDriver.c installDriver.h
- C -b installDriver.c
-
- # Compile the TDriver object. Usual dependencies.
- TDriver.cp.o ƒ iacDriver.make TDriver.cp TDriver.h
- CPlus TDriver.cp -o TDriver.cp.o {CPlusOptions}
-
- # Compile the TMessage object. Usual dependencies.
- TMessage.cp.o ƒ iacDriver.make TMessage.cp TMessage.h
- CPlus TMessage.cp -o TMessage.cp.o {CPlusOptions}
-
- # Compile the extern "C" code. Usual dependencies.
- DriverWrapper.cp.o ƒ iacDriver.make DriverWrapper.cp DriverWrapper.h
- CPlus DriverWrapper.cp -o DriverWrapper.cp.o {CPlusOptions}
-
- # Compile the replacements for the global new/delete operators which CFront includes
- # whenever it calls a constructor. Our only dependencies here are the makefile and the
- # code itself.
- iacGlobalNewDel.cp.o ƒ iacDriver.make iacGlobalNewDel.cp
- CPlus iacGlobalNewDel.cp -o iacGlobalNewDel.cp.o {CPlusOptions}
-
- # Compile the assembly glue object. Usual dependencies
- DriverGlue.a.o ƒ iacDriver.make DriverGlue.a DriverGlue.incl.a
- asm -case obj DriverGlue.a
-
-
- # Link everything for the driver together. -rt specifies the resource type.
- # In this case, it's 'DRVR' with an ID of 75. -m specifies which routine in the
- # object files is the first one, so we tell it to look for the first one in the
- # assembly file. -sn renames the main segment to ".TimDriver". -ra is pretty
- # self-explanatory, except you have to specify which segment(s) get the resource
- # attributes. Note the only library I needed for this entire thing was Interface.o.
- iacDriver.DRVR ƒƒ iacDriver.make {CPOBJECTS}
- Link -rt DRVR=75 -m HEADERDEF -sn "Main=.TimDriver" -c 'TSEN ' -t 'DRVR' ∂
- -ra ".TimDriver"=resSysHeap,resLocked,resPreLoad ∂
- {CPOBJECTS} ∂
- "{Libraries}Interface.o" ∂
- -o iacDriver.DRVR
-
-
- # Link everything for the INIT together. Not much here. Much of the same options get
- # passed to the INIT linking as to the DRVR linking. Again, only Interface.o needed.
- installDriver ƒƒ installDriver.c.o iacDriver.make
- Link -rt INIT=8483 -sn "Main=InitSeg" -c 'TSEN' -t 'INIT' -m MAIN ∂
- -ra InitSeg=resSysHeap,resLocked,resPreLoad ∂
- {COBJECTS} ∂
- "{Libraries}"Interface.o ∂
- -o installDriver
-
-
- # Finally, the entire file must be put together. It consists of the DRVR, the INIT,
- # and the 'sysz' resources. The DRVR is in iacDriver.DRVR, the INIT in installDriver,
- # and the 'sysz' resource in iacDriver.r. It's a pain in the butt to derez these
- # things, but I couldn't find any other way for rez to combine resources from several
- # files into one output file. All the output gets put into the file "iacDriver".
- # Notice the second two rez lines simply append their resources to the file (with the
- # -a option).
- iacDriver ƒƒ iacDriver.r iacDriver.DRVR installDriver
- rez iacDriver.r -c TSEN -t INIT -a -o iacDriver
-